package com.neusoft.controller;

import com.neusoft.service.SchedulingService;
import com.neusoft.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author akemihomurasama
 */
@RestController
@RequestMapping("/scheduling")
@CrossOrigin
public class SchedulingController {
    @Autowired
    private SchedulingService schedulingService;
    /**
     * 根据排班规则查询排班信息
     *
     * @param weekRule 排班规则
     * @return 排班信息
     */
    @RequestMapping("/querySchedulingByRule/{weekRule}")
    public Result querySchedulingByRule(@PathVariable("weekRule") String weekRule) {
        return schedulingService.querySchedulingByRule(weekRule);
    }
}
